package com.cnplan.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.cnplan.entity.GisQjsgcEntity;
import com.cnplan.entity.GisRedlineEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GisRedlineMapper extends BaseMapper<GisRedlineEntity> {
    @Select(value = "SELECT *,st_asgeojson(geom) as geojson FROM \"gis_redline\" WHERE st_intersects(st_pointfromtext('point(${x} ${y})', st_srid(geom)),geom)=TRUE")
    List<GisRedlineEntity> getAllByGeom(@Param("x") String x, @Param("y") String y);
}
